home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0103 / vb.zip / KMARKS.FRM < prev    next >
Text File  |  1996-01-17  |  15KB  |  477 lines

  1. VERSION 2.00
  2. Begin Form MarkDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Mark Properties Demo"
  6.    ClientHeight    =   3885
  7.    ClientLeft      =   1740
  8.    ClientTop       =   3060
  9.    ClientWidth     =   8580
  10.    Height          =   4290
  11.    Left            =   1680
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   259
  17.    ScaleMode       =   3  'Pixel
  18.    ScaleWidth      =   572
  19.    Top             =   2715
  20.    Width           =   8700
  21.    Begin Frame Frame1 
  22.       BackColor       =   &H00C0C0C0&
  23.       Caption         =   "Mark Position/Size Properties"
  24.       FontBold        =   -1  'True
  25.       FontItalic      =   0   'False
  26.       FontName        =   "Arial"
  27.       FontSize        =   8.25
  28.       FontStrikethru  =   0   'False
  29.       FontUnderline   =   0   'False
  30.       Height          =   1155
  31.       Left            =   3945
  32.       TabIndex        =   4
  33.       Top             =   1215
  34.       Width           =   4470
  35.       Begin HScrollBar HScroll1 
  36.          Height          =   240
  37.          Index           =   0
  38.          Left            =   1920
  39.          Max             =   100
  40.          TabIndex        =   20
  41.          Top             =   270
  42.          Width           =   2000
  43.       End
  44.       Begin HScrollBar HScroll1 
  45.          Height          =   240
  46.          Index           =   1
  47.          Left            =   1920
  48.          Max             =   100
  49.          TabIndex        =   22
  50.          Top             =   510
  51.          Width           =   2000
  52.       End
  53.       Begin HScrollBar HScroll1 
  54.          Height          =   240
  55.          Index           =   2
  56.          Left            =   1920
  57.          Max             =   100
  58.          TabIndex        =   24
  59.          Top             =   750
  60.          Width           =   2000
  61.       End
  62.       Begin Label Label2 
  63.          AutoSize        =   -1  'True
  64.          BackStyle       =   0  'Transparent
  65.          Caption         =   "0"
  66.          Height          =   195
  67.          Index           =   0
  68.          Left            =   3990
  69.          TabIndex        =   0
  70.          Top             =   285
  71.          Width           =   120
  72.       End
  73.       Begin Label Label1 
  74.          AutoSize        =   -1  'True
  75.          BackStyle       =   0  'Transparent
  76.          Caption         =   "Mark Inner Radius:"
  77.          FontBold        =   0   'False
  78.          FontItalic      =   0   'False
  79.          FontName        =   "Arial"
  80.          FontSize        =   8.25
  81.          FontStrikethru  =   0   'False
  82.          FontUnderline   =   0   'False
  83.          Height          =   210
  84.          Index           =   0
  85.          Left            =   570
  86.          TabIndex        =   1
  87.          Top             =   285
  88.          Width           =   1335
  89.       End
  90.       Begin Label Label1 
  91.          AutoSize        =   -1  'True
  92.          BackStyle       =   0  'Transparent
  93.          Caption         =   "Mark Outer Radius:"
  94.          FontBold        =   0   'False
  95.          FontItalic      =   0   'False
  96.          FontName        =   "Arial"
  97.          FontSize        =   8.25
  98.          FontStrikethru  =   0   'False
  99.          FontUnderline   =   0   'False
  100.          Height          =   210
  101.          Index           =   1
  102.          Left            =   525
  103.          TabIndex        =   5
  104.          Top             =   525
  105.          Width           =   1380
  106.       End
  107.       Begin Label Label2 
  108.          AutoSize        =   -1  'True
  109.          BackStyle       =   0  'Transparent
  110.          Caption         =   "0"
  111.          Height          =   195
  112.          Index           =   1
  113.          Left            =   3990
  114.          TabIndex        =   6
  115.          Top             =   540
  116.          Width           =   120
  117.       End
  118.       Begin Label Label1 
  119.          AutoSize        =   -1  'True
  120.          BackStyle       =   0  'Transparent
  121.          Caption         =   "Mark Width:"
  122.          FontBold        =   0   'False
  123.          FontItalic      =   0   'False
  124.          FontName        =   "Arial"
  125.          FontSize        =   8.25
  126.          FontStrikethru  =   0   'False
  127.          FontUnderline   =   0   'False
  128.          Height          =   210
  129.          Index           =   2
  130.          Left            =   1065
  131.          TabIndex        =   25
  132.          Top             =   765
  133.          Width           =   840
  134.       End
  135.       Begin Label Label2 
  136.          AutoSize        =   -1  'True
  137.          BackStyle       =   0  'Transparent
  138.          Caption         =   "0"
  139.          Height          =   195
  140.          Index           =   2
  141.          Left            =   3990
  142.          TabIndex        =   27
  143.          Top             =   780
  144.          Width           =   120
  145.       End
  146.    End
  147.    Begin KNOB Knob1 
  148.       Angle           =   0
  149.       AutoRedraw      =   -1  'True
  150.       AVersion        =   2.5
  151.       BackgroundColor =   &H00C0C0C0&
  152.       BevelInner      =   0  ' 0 - None
  153.       BevelOuter      =   1  ' 1 - Raised
  154.       BevelWidth      =   2
  155.       BorderType      =   1  ' 1 - Bevel
  156.       BorderWidth     =   2
  157.       Digital         =   0   'False
  158.       DigitalColor    =   &H00000000&
  159.       DigitalDecimals =   0
  160.       DigitalFontID   =   0
  161.       DigitalX        =   0
  162.       DigitalY        =   0
  163.       FontID          =   0
  164.       FrameColor      =   &H00000000&
  165.       FrameScaleX     =   0
  166.       FrameScaleY     =   0
  167.       FrameStyle      =   0  ' 0 - None
  168.       Height          =   3705
  169.       KnobColor       =   &H00808080&
  170.       KnobMultiTurn   =   0   'False
  171.       KnobMultiTurnValue=   0
  172.       KnobRadius      =   0.6
  173.       KnobSnap        =   0   'False
  174.       KnobSnapIncrement=   1
  175.       KnobStyle       =   0  ' 0 - Cicular
  176.       KnobUserDefined =   ""
  177.       KnobValue       =   0
  178.       Left            =   135
  179.       MarkUserDefined =   "0,1000,  500,200,  0,0,  -500,500"
  180.       MouseControl    =   -1  'True
  181.       OutlineAlign    =   0  ' 0 - Left 
  182.       OutlineColor    =   &H00000000&
  183.       OutlineTitle    =   ""
  184.       OutlineWidth    =   0
  185.       Radius          =   0
  186.       TabIndex        =   28
  187.       Top             =   90
  188.       Value           =   0
  189.       Width           =   3690
  190.       XScale          =   0
  191.       YScale          =   0
  192.       ZLoad           =   KMARKS.FRX:0000
  193.    End
  194.    Begin TextBox Text1 
  195.       Height          =   1125
  196.       Left            =   3960
  197.       MultiLine       =   -1  'True
  198.       TabIndex        =   2
  199.       Text            =   "0,1000,  500,200,  0,0,  -500,500"
  200.       Top             =   2685
  201.       Width           =   4455
  202.    End
  203.    Begin Frame Frame3 
  204.       BackColor       =   &H00C0C0C0&
  205.       Caption         =   "Mark Color"
  206.       FontBold        =   -1  'True
  207.       FontItalic      =   0   'False
  208.       FontName        =   "Arial"
  209.       FontSize        =   8.25
  210.       FontStrikethru  =   0   'False
  211.       FontUnderline   =   0   'False
  212.       Height          =   1140
  213.       Left            =   6765
  214.       TabIndex        =   21
  215.       Top             =   75
  216.       Width           =   1290
  217.       Begin Label Colors 
  218.          BackColor       =   &H000080FF&
  219.          Height          =   225
  220.          Index           =   8
  221.          Left            =   285
  222.          TabIndex        =   3
  223.          Top             =   810
  224.          Width           =   225
  225.       End
  226.       Begin Label Colors 
  227.          BackColor       =   &H00FF00FF&
  228.          Height          =   225
  229.          Index           =   7
  230.          Left            =   765
  231.          TabIndex        =   8
  232.          Top             =   810
  233.          Width           =   225
  234.       End
  235.       Begin Label Colors 
  236.          BackColor       =   &H00FF0000&
  237.          Height          =   225
  238.          Index           =   6
  239.          Left            =   285
  240.          TabIndex        =   9
  241.          Top             =   570
  242.          Width           =   225
  243.       End
  244.       Begin Label Colors 
  245.          BackColor       =   &H0000FFFF&
  246.          Height          =   225
  247.          Index           =   5
  248.          Left            =   525
  249.          TabIndex        =   10
  250.          Top             =   810
  251.          Width           =   225
  252.       End
  253.       Begin Label Colors 
  254.          BackColor       =   &H0000FF00&
  255.          Height          =   225
  256.          Index           =   4
  257.          Left            =   765
  258.          TabIndex        =   11
  259.          Top             =   330
  260.          Width           =   225
  261.       End
  262.       Begin Label Colors 
  263.          BackColor       =   &H000000FF&
  264.          Height          =   225
  265.          Index           =   3
  266.          Left            =   765
  267.          TabIndex        =   12
  268.          Top             =   570
  269.          Width           =   225
  270.       End
  271.       Begin Label Colors 
  272.          BackColor       =   &H00FFFFFF&
  273.          Height          =   225
  274.          Index           =   2
  275.          Left            =   525
  276.          TabIndex        =   13
  277.          Top             =   330
  278.          Width           =   225
  279.       End
  280.       Begin Label Colors 
  281.          BackColor       =   &H00808080&
  282.          Height          =   225
  283.          Index           =   1
  284.          Left            =   525
  285.          TabIndex        =   14
  286.          Top             =   570
  287.          Width           =   225
  288.       End
  289.       Begin Label Colors 
  290.          BackColor       =   &H00000000&
  291.          Height          =   225
  292.          Index           =   0
  293.          Left            =   285
  294.          TabIndex        =   15
  295.          Top             =   330
  296.          Width           =   225
  297.       End
  298.    End
  299.    Begin Frame Frame2 
  300.       BackColor       =   &H00C0C0C0&
  301.       Caption         =   "Mark Style"
  302.       FontBold        =   -1  'True
  303.       FontItalic      =   0   'False
  304.       FontName        =   "Arial"
  305.       FontSize        =   8.25
  306.       FontStrikethru  =   0   'False
  307.       FontUnderline   =   0   'False
  308.       Height          =   1080
  309.       Left            =   3930
  310.       TabIndex        =   16
  311.       Top             =   75
  312.       Width           =   2265
  313.       Begin OptionButton Option2 
  314.          BackColor       =   &H00C0C0C0&
  315.          Caption         =   "User"
  316.          FontBold        =   0   'False
  317.          FontItalic      =   0   'False
  318.          FontName        =   "Arial"
  319.          FontSize        =   8.25
  320.          FontStrikethru  =   0   'False
  321.          FontUnderline   =   0   'False
  322.          Height          =   225
  323.          Index           =   4
  324.          Left            =   1200
  325.          TabIndex        =   19
  326.          Top             =   525
  327.          Width           =   870
  328.       End
  329.       Begin OptionButton Option2 
  330.          BackColor       =   &H00C0C0C0&
  331.          Caption         =   "Arrow"
  332.          FontBold        =   0   'False
  333.          FontItalic      =   0   'False
  334.          FontName        =   "Arial"
  335.          FontSize        =   8.25
  336.          FontStrikethru  =   0   'False
  337.          FontUnderline   =   0   'False
  338.          Height          =   225
  339.          Index           =   3
  340.          Left            =   1200
  341.          TabIndex        =   23
  342.          Top             =   315
  343.          Width           =   870
  344.       End
  345.       Begin OptionButton Option2 
  346.          BackColor       =   &H00C0C0C0&
  347.          Caption         =   "Triangular"
  348.          FontBold        =   0   'False
  349.          FontItalic      =   0   'False
  350.          FontName        =   "Arial"
  351.          FontSize        =   8.25
  352.          FontStrikethru  =   0   'False
  353.          FontUnderline   =   0   'False
  354.          Height          =   225
  355.          Index           =   2
  356.          Left            =   135
  357.          TabIndex        =   7
  358.          Top             =   720
  359.          Width           =   990
  360.       End
  361.       Begin OptionButton Option2 
  362.          BackColor       =   &H00C0C0C0&
  363.          Caption         =   "Circular"
  364.          FontBold        =   0   'False
  365.          FontItalic      =   0   'False
  366.          FontName        =   "Arial"
  367.          FontSize        =   8.25
  368.          FontStrikethru  =   0   'False
  369.          FontUnderline   =   0   'False
  370.          Height          =   225
  371.          Index           =   1
  372.          Left            =   135
  373.          TabIndex        =   18
  374.          Top             =   510
  375.          Width           =   990
  376.       End
  377.       Begin OptionButton Option2 
  378.          BackColor       =   &H00C0C0C0&
  379.          Caption         =   "None"
  380.          FontBold        =   0   'False
  381.          FontItalic      =   0   'False
  382.          FontName        =   "Arial"
  383.          FontSize        =   8.25
  384.          FontStrikethru  =   0   'False
  385.          FontUnderline   =   0   'False
  386.          Height          =   225
  387.          Index           =   0
  388.          Left            =   135
  389.          TabIndex        =   17
  390.          Top             =   300
  391.          Width           =   990
  392.       End
  393.    End
  394.    Begin Label Label1 
  395.       AutoSize        =   -1  'True
  396.       BackStyle       =   0  'Transparent
  397.       Caption         =   "Mark Shape: (x,y pair list)"
  398.       FontBold        =   -1  'True
  399.       FontItalic      =   0   'False
  400.       FontName        =   "Arial"
  401.       FontSize        =   8.25
  402.       FontStrikethru  =   0   'False
  403.       FontUnderline   =   0   'False
  404.       Height          =   210
  405.       Index           =   3
  406.       Left            =   3960
  407.       TabIndex        =   26
  408.       Top             =   2460
  409.       Width           =   2070
  410.    End
  411. End
  412.  
  413. Sub Colors_Click (index As Integer)
  414.  
  415.     knob1.MarkColor = colors(index).BackColor
  416.  
  417. End Sub
  418.  
  419. Sub Form_Load ()
  420.  
  421.     hscroll1(0) = knob1.MarkInnerRadius * 100
  422.     hscroll1(1) = knob1.MarkOuterRadius * 100
  423.     hscroll1(2) = knob1.MarkWidth * 100
  424.     option2(knob1.MarkStyle) = True
  425.     text1 = knob1.MarkUserDefined
  426.  
  427.     For i% = 0 To 2
  428.         label2(i%) = hscroll1(i%) / 100
  429.     Next
  430.  
  431. End Sub
  432.  
  433. Sub HScroll1_Change (index As Integer)
  434.  
  435.     Select Case index
  436.         Case 0
  437.             knob1.MarkInnerRadius = hscroll1(0) / 100
  438.             label2(0) = hscroll1(0) / 100
  439.         Case 1
  440.             knob1.MarkOuterRadius = hscroll1(1) / 100
  441.             label2(1) = hscroll1(1) / 100
  442.         Case 2
  443.             knob1.MarkWidth = hscroll1(2) / 100
  444.             label2(2) = hscroll1(2) / 100
  445.     End Select
  446.  
  447. End Sub
  448.  
  449. Sub HScroll1_Scroll (index As Integer)
  450.  
  451.     Select Case index
  452.         Case 0
  453.             knob1.MarkInnerRadius = hscroll1(0) / 100
  454.             label2(0) = hscroll1(0) / 100
  455.         Case 1
  456.             knob1.MarkOuterRadius = hscroll1(1) / 100
  457.             label2(1) = hscroll1(1) / 100
  458.         Case 2
  459.             knob1.MarkWidth = hscroll1(2) / 100
  460.             label2(2) = hscroll1(2) / 100
  461.     End Select
  462.  
  463. End Sub
  464.  
  465. Sub Option2_Click (index As Integer)
  466.  
  467.     knob1.MarkStyle = index
  468.  
  469. End Sub
  470.  
  471. Sub Text1_Change ()
  472.     
  473.     knob1.MarkUserDefined = text1
  474.  
  475. End Sub
  476.  
  477.